
package com.hlkj.pay.vo.order.resp;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import com.baomidou.mybatisplus.annotation.TableField;
import com.hlkj.pay.vo.BaseOrderResp;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @author HlpayTeam
 * @date 2024/10/10 13:22
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class PayOrderDetailResp extends BaseOrderResp {

    @Schema(description = "平台订单号")
    private String payOrderNo;

    /**
     * 商户订单号
     */
    @Schema(description = "商户订单号")
    private String mchOrderNo;

    /**
     * 机构订单号
     */
    @Schema(description = "机构订单号")
    private String insOrderNo;

    /**
     * 渠道订单号
     */
    @Schema(description = "渠道订单号")
    private String channelOrderNo;

    /**
     * 渠道附加订单号
     */
    @Schema(description = "渠道附加订单号")
    private String channelOrderId;

    /**
     * 商户通道id
     */
    @Schema(description = "商户通道code")
    private String mchChannelCode;
    
    @Schema(description = "支付类型 WECHAT: 微信 ALIPAY: 支付宝 UNION_APY: 云闪付 DIGITAL: 数字人民币")
    private String payType;
    
    @Schema(description = "支付方式 Native- 扫码支付； JSAPI-微信JSAPI、支付宝JSAPI支付、银联JSAPI支付； SIMPLE-简易支付 MINI_APP-微信小程序支付、支付宝小程序支付 H5-h5 支付 APP-APP 支付")
    private String paySubType;
    
    @Schema(description = "场景类型 1 线下 2 线上")
    private Integer sceneType;

    @Schema(description = "子商户id")
    private String subMchId;
    /**
     * 订单金额
     */
    @Schema(description = "订单金额")
    private BigDecimal amount;
    /**
     * 订单金额
     */
    @Schema(description = "实际支付金额")
    private BigDecimal payAmount;
    /**
     * 客户端IP
     */
    @Schema(description = "客户端IP")
    private String clientIp;

    /**
     * 商品标题
     */
    @Schema(description = "商品标题")
    private String subject;

    /**
     * 商品描述信息
     */
    @Schema(description = "商品描述信息")
    private String description;

    /**
     * 特定支付方式额外参数
     */
    @Schema(description = "特定支付方式额外参数")
    private String extra;

    /**
     * 异步通知地址
     */
    @Schema(description = "异步通知地址")
    private String notifyUrl;

    /**
     * 页面跳转地址
     */
    @Schema(description = "页面跳转地址")
    private String redirectUrl;

    /**
     * 订单状态，1=初始化，2=支付中，3=支付成功，4=已撤销，5=订单关闭 6=支付失败，
     * @see com.hlkj.pay.enums.PayOrderEnums.PAY_ORDER_STATUS
     */
    @Schema(description = "订单状态，1=初始化，2=支付中，3=支付成功，4=已撤销，5=订单关闭 6=订单关闭中 7=支付失败")
    private Integer state;

    /**
     * 订单失效时间
     */
    @Schema(description = "订单失效时间")
    private Long expiredTime;

    /**
     * 订单成功时间
     */
    @Schema(description = "订单成功时间")
    private Long successTime;

    /**
     * 渠道支付错误码
     */
    @Schema(description = "渠道支付错误码")
    private String bankCode;

    /**
     * 渠道支付错误描述
     */
    @Schema(description = "渠道支付错误描述")
    private String bankMsg;

    /**
     * 子商户号
     */
    @Schema(description = "交易商户号")
    private String orderSn;

    /**
     * 商户商户号
     */
    @Schema(description = "appid")
    private String appId;




    /**
     * 商户通道拓展
     */
    @Schema(description = "商户通道拓展")
    private String channelConfig;

    /**
     * 平台交易手续费
     */
    @Schema(description = "平台交易手续费")
    private BigDecimal feeAmount;

    /**
     * 机构交易手续费
     */
    @Schema(description = "机构交易手续费")
    private BigDecimal channelFeeAmount;

    /**
     * 实际结算金额
     */
    @Schema(description = "实际结算金额")
    private BigDecimal settlementAmount;

    /**
     * 平台手续费费率
     */
    @Schema(description = "平台手续费费率")
    private BigDecimal feeRate;

    /**
     * 机构手续费费率
     */
    @Schema(description = "机构手续费费率")
    private BigDecimal channelFeeRate;

    /**
     * 向下游回调状态, 0-未发送, 1-已发送'
     */
    @Schema(description = "向下游回调状态, 0-未回调,  1-已回调'")
    private Integer notifyState;


    /**
     *
     */
    @Schema(description = "手续费计算时间")
    private Long feeTime;

    /**
     *
     */
    @Schema(description = "通知时间")
    private Long notifyTime;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private String userId;

    /**
     * 是否有退款，1 未退款 2 退款中 3 部分退款 4 退款完成
     */
    @Schema(description = "是否有退款，1 未退款 2 退款中 3 部分退款 4 退款完成")
    private Integer refundStatus;

    /**
     * 退款金额
     */
    @Schema(description = "退款金额")
    private BigDecimal refundAmount;

    /**
     * 是否分账，1=有，0=无
     */
    @Schema(description = "分账类型 ，0或空=无分账，1=实时分账，2=延时分账，3=商户 预设默认分账")
    private Integer fundProcessType;

    /**
     * 可分账金额
     */
    @Schema(description = "可分账金额")
    private BigDecimal orderSplitAmount;

    /**
     * 签名方式 RSA2,MD5
     */
    @Schema(description = "签名方式 RSA2,MD5")
    private String signType;

    /**
     * ATU真实商户号
     */
    @Schema(description = "ATU真实商户号")
    private String atuSubMerId;
    @Schema(description = "aut通道编码")
    private String autCode;

    /**
     * 平台分账串
     */
    @Schema(description = "平台分账串")
    private String acctInfos;
    
    @TableField(exist = false)
    private String payInfo;
    @Schema(description = "支付数据类型，pay_url-支付链接，pay_url_form-支付链接强制必须跳转（直接访问链接跳转），wx_jspay-微信支付参数(微信公众号,小程序,app支付时)，ali_jspay-支付宝支付参数，ysf_jspay-云闪付支付参数，，bank_info-银行转账参数，code_url-二维码地址codeImg_url-二维码图片地址,none-空支付参数")
    @TableField(exist = false)
    private String payDataType;

    @Schema(description = "采集信息JSON,key-value键值对")
    private String colletJson;
    @Schema(description = "订单备注")
    private String remark;

    @Schema(description = "分账状态 1：未分账  2：部分分账  3：分账完成")
    private Integer accStatus;
}
